module DockerRails
  class Application
    def version
      '1.11.0'
    end

    def build_time
      @build_time ||= File.read('BUILD_TIME').lines.first.chomp.to_datetime
    rescue Errno::ENOENT
      Time.current
    end

    def ruby_version
      "#{RUBY_VERSION} patchlevel #{RUBY_PATCHLEVEL}"
    end

    def rubygems_version
      Gem::VERSION
    end

    def bundler_version
      Bundler::VERSION
    end

    def rails_version
      Rails::VERSION::STRING
    end
  end
end
